//
//  Constants.h
//  SkyworthPalmExam
//
//  Created by Arvin Wang on 15/1/19.
//  Copyright (c) 2015年 Arvin Wang. All rights reserved.
//




@interface Constants : NSObject

/**
 * statusBar 背景颜色
 */
+ (void)setStatusBarWhite:(UIViewController *)viewController;

/**
 *  手动隐藏tabBar
 */
+(void)hideTabBar:(UITabBarController *) tabbarcontroller;
+(void)showTabBar:(UITabBarController *) tabbarcontroller;
/**
   tableView 基本属性

   @param tableView tabV
 */
+ (void)setExtraCellLineHidden:(UITableView *)tableView;
+ (void)setSettingTableViewStyle:(UITableView *)tableView;

/**
 *  UIImageView 的相关处理
 */
+ (UIImageView *)loadImageViewWithURL:(NSString *)url imageViewFrame:(CGRect)frame superView:(UIView *)view;
+ (UIImageView *)loadImageViewWithURL:(NSString *)url imageViewFrame:(CGRect)frame superView:(UIView *)view contentMode:(UIViewContentMode)contentMode;
+ (void)setImageWithURL:(NSString *)url imageView:(UIImageView *)imageView contentMode:(UIViewContentMode)contentMode;
+ (void)setImageWithURL:(NSString *)url imageView:(UIImageView *)imageView;
+ (void)setImageWithURL:(NSString *)url imageView:(UIImageView *)imageView placeholder:(NSString *)placeholder;
+ (void)setImageWithURL:(NSString *)url imageView:(UIImageView *)imageView placeholder:(NSString *)placeholder autoSize:(BOOL)autoSize;

/**
 *  dictionary to jason
 */
+(NSString *)JSONString:(id)object;

/**
 *  调用系统电话拨号
 *
 *  @param phoneNum 拨打的电话号码
 *  @param callVC   调用的ViewController类
 */
+ (void)callTelephoneWithPhone:(NSString *)phoneNum atViewController:(UIViewController *)callVC;

/**
 *  由UIColor 转换成UIImage
 */
+ (UIImage *)createImageWithColor:(UIColor *)color;

+ (BOOL) validateMobile:(NSString *)mobile;
+ (BOOL) validateBankCard:(NSString*) cardNo;
+ (NSString*)weekdayStringFromDate:(NSDate*)inputDate;
+(int)daysFromStartDate:(NSDate*)sDate toEndDate:(NSString*)eDate;
+(BOOL)isTheSameDayBetween:(NSDate*)sDate andDate:(NSDate*)eDate;

+ (NSString *)getAlipayMessage:(NSUInteger)resultStatus;

+(BOOL)checkEmail:(NSString *)str;
+ (BOOL)checkTel:(NSString *)str;
+ (BOOL) validateIdentityCard: (NSString *)identityCard;
+(BOOL)checkPassWord:(NSString *)str;

+ (NSString *)getStatusByOrderStatus:(NSInteger)orderStatus;

+ (NSString *)createUUID;
- (BOOL)validateMobile:(NSString *)mobileNum;

+ (NSString *)encryptForMobile:(NSString *)phoneNumber;//手机号中间4位显示为＊

+ (NSString *)stringByDateStr:(NSString *)dateString withFormatter:(NSString*)formatter;
/**
 *  计算剩余天数
 *
 *  @param dateString 未来的日期
 *
 *  @return 返回距离未来日期的天数
 */
+ (NSString*)calculateRemainingDays:(NSString*)dateString;

+ (NSDate *)getDateWithDateString:(NSString *)DateStr;

+ (NSDateComponents *)getTimeDifferenceWithOldDate:(NSDate *)oldDate newDate:(NSDate *)newDate;
/**
 *  时间戳转日期
 *
 *  @param timestamp 时间戳
 *
 *  @return 日期
 */
+ (NSString*)timestampChangeDateTime:(NSString*)timestamp formatter:(NSString*)formatter;
/**
 *  字节的转换
 *
 *  @param fileSize 字节b
 *
 *  @return 转换成GB、MB、KB
 */
+ (NSString*)byteConversionGBMBKB:(NSString*)fileSize;


+ (NSString *)getOrderStatusWithApprovalType:(NSString *)approvalType orderStatus:(NSString *)orderStatus;

+ (NSString *)getSaleApplyStatusWithApprovalStatus:(NSString *)approvalStatus approvalType:(NSString *)approvalType;

+ (NSString *)getSaleCheckStatusWithApprovalStatus:(NSString *)approvalStatus approvalType:(NSString *)approvalType;

+ (NSString *)getActiviteGoalStrWithNumberStr:(NSString *)numberStr;

@end
